//
//  Block.h
//  AvoidBlock
//
//  Created by 함 우식 on 12. 12. 10..
//
//

#ifndef AvoidBlock_Block_h
#define AvoidBlock_Block_h

#include "cocos2d.h"
#include "AvoidBlock.h"

class Block : public CCNode
{
public:
    
    int _type;
    bool _isAlive;
    CCSprite* _pBody;
    CCPoint _currVelocity;
    CCSprite* _pCollisionBox;
    
    Block();
    bool init(void);
    void update(float dt);
    void revive();
    void dead();
    void setPosition(CCPoint position);
    CCPoint position();
    void setVisible(bool visible);
    bool isVisible();
    CCRect boundingBox();
    
    static Block * blockWithType(const int type);
    
private:
    static Block * initWithType(const int type);
};


#endif
